package com.ruoyi.project.system.newfunction.service.impl;

import com.ruoyi.project.system.newfunction.domain.Registration_cost;
import com.ruoyi.project.system.newfunction.mapper.Registration_costMapper;
import com.ruoyi.project.system.newfunction.service.Registration_costService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.Date;
import java.util.List;
@Service
@Transactional
public class Registration_costServiceImpl implements Registration_costService {
    @Autowired
    private Registration_costMapper registration_costMapper;
    @Override
    public List<Registration_cost> findAllByPage(Registration_cost registration_cost) {
        return registration_costMapper.findAllByPage(registration_cost);
    }

    @Override
    public int addRegistrationCost(Registration_cost registration_cost) {
        registration_cost.setCreateTime(new Date());
        return registration_costMapper.addRegistrationCost(registration_cost);
    }

    @Override
    public Registration_cost findOneById(Integer regId) {
        return registration_costMapper.findOneById(regId);
    }

    @Override
    public int updateRegistrationCost(Registration_cost registration_cost) {
        registration_cost.setUpdateTime(new Date());
        return registration_costMapper.updateRegistrationCost(registration_cost);
    }

    @Override
    public int removeRegistrationCost(Long[] regIds) {
        return registration_costMapper.removeRegistrationCost(regIds);
    }
}
